package com.java.distributed.beans;


import java.io.Serializable;

/**
 * 封装返回结果公共类
 *
 * @param
 * @author kevin_Xu
 * @date 2018/6/11 10:15
 * @return
 */
public class CommonResult<T> implements Serializable {


    private boolean success = true;

    private String msg ;

    private T result;

    private String resultCode = "0";

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public CommonResult() {
    }

    public CommonResult( T result) {
        this.msg = "成功";
        this.result = result;
    }

    public CommonResult(boolean success, String msg, T result, String resultCode) {
        this.success = success;
        this.msg = msg;
        this.result = result;
        this.resultCode = resultCode;
    }
}
